package com.project.nimsen.weixin.bean;

import org.apache.commons.lang3.StringUtils;
import org.dom4j.Element;

/**
 * 自定义菜单事件
 * */
public class EventKeyRMsg extends EventRMsg {
	private String eventKey;//事件KEY值

	public String getEventKey() {
		return eventKey;
	}

	public void setEventKey(String eventKey) {
		this.eventKey = eventKey;
	}

	protected String info() {
		StringBuffer info = new StringBuffer(super.info());
		info.append("<EventKey><![CDATA[").append(this.getEventKey()).append("]]></EventKey>");
		return info.toString();
	}

	protected void fullchildProperty(Element root) {
		super.fullchildProperty(root);
		String ventKey = root.elementText("EventKey");
		if(StringUtils.isNotBlank(ventKey))
			this.setEventKey(ventKey);
	}
}
